home *** CD-ROM | disk | FTP | other *** search
-
-
-
- sssseeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk)))) sssseeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk))))
-
-
-
- NNNNAAAAMMMMEEEE
- selection - Manipulate the X selection
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- sssseeeelllleeeeccccttttiiiioooonnnn _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- This command provides a Tcl interface to the X selection mechanism and
- implements the full selection functionality described in the X Inter-
- Client Communication Conventions Manual (ICCCM).
-
- The first argument to sssseeeelllleeeeccccttttiiiioooonnnn determines the format of the rest of the
- arguments and the behavior of the command. The following forms are
- currently supported:
-
- sssseeeelllleeeeccccttttiiiioooonnnn cccclllleeeeaaaarrrr ?----ddddiiiissssppppllllaaaayyyyooooffff _w_i_n_d_o_w? ?----sssseeeelllleeeeccccttttiiiioooonnnn _s_e_l_e_c_t_i_o_n?
- If _s_e_l_e_c_t_i_o_n exists anywhere on _w_i_n_d_o_w's display, clear it so that |
- no window owns the selection anymore. _S_e_l_e_c_t_i_o_n specifies the X |
- selection that should be cleared, and should be an atom name such as|
- PRIMARY or CLIPBOARD; see the Inter-Client Communication Conventions|
- Manual for complete details. _S_e_l_e_c_t_i_o_n defaults to PRIMARY and |
- _w_i_n_d_o_w defaults to ``.''. Returns an empty string.
-
- sssseeeelllleeeeccccttttiiiioooonnnn ggggeeeetttt ?----ddddiiiissssppppllllaaaayyyyooooffff _w_i_n_d_o_w? ?----sssseeeelllleeeeccccttttiiiioooonnnn _s_e_l_e_c_t_i_o_n? ?----ttttyyyyppppeeee _t_y_p_e?
- Retrieves the value of _s_e_l_e_c_t_i_o_n from _w_i_n_d_o_w's display and returns |
- it as a result. _S_e_l_e_c_t_i_o_n defaults to PRIMARY and _w_i_n_d_o_w defaults |
- to ``.''. _T_y_p_e specifies the form in which the selection is to be
- returned (the desired ``target'' for conversion, in ICCCM
- terminology), and should be an atom name such as STRING or
- FILE_NAME; see the Inter-Client Communication Conventions Manual for
- complete details. _T_y_p_e defaults to STRING. The selection owner may
- choose to return the selection in any of several different
- representation formats, such as STRING, ATOM, INTEGER, etc. (this
- format is different than the selection type; see the ICCCM for all
- the confusing details). If the selection is returned in a non-
- string format, such as INTEGER or ATOM, the sssseeeelllleeeeccccttttiiiioooonnnn command
- converts it to string format as a collection of fields separated by
- spaces: atoms are converted to their textual names, and anything
- else is converted to hexadecimal integers.
-
- sssseeeelllleeeeccccttttiiiioooonnnn hhhhaaaannnnddddlllleeee ?----sssseeeelllleeeeccccttttiiiioooonnnn _s_e_l? ?----ttttyyyyppppeeee _t_y_p? ?----ffffoooorrrrmmmmaaaatttt _f_m_t? _w_i_n_d_o_w _c_o_m_m_a_n_d
- Creates a handler for selection requests, such that _c_o_m_m_a_n_d will be |
- executed whenever _s_e_l_e_c_t_i_o_n is owned by _w_i_n_d_o_w and someone attempts |
- to retrieve it in the form given by _t_y_p_e (e.g. _t_y_p_e is specified in |
- the sssseeeelllleeeeccccttttiiiioooonnnn ggggeeeetttt command). _S_e_l_e_c_t_i_o_n defaults to PRIMARY, _t_y_p_e |
- defaults to STRING, and _f_o_r_m_a_t defaults to STRING. If _c_o_m_m_a_n_d is an|
- empty string then any existing handler for _w_i_n_d_o_w, _t_y_p_e, and |
- _s_e_l_e_c_t_i_o_n is removed. |
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- sssseeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk)))) sssseeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk))))
-
-
-
- When _s_e_l_e_c_t_i_o_n is requested, _w_i_n_d_o_w is the selection owner, and _t_y_p_e|
- is the requested type, _c_o_m_m_a_n_d will be executed as a Tcl command |
- with two additional numbers appended to it (with space separators).
- The two additional numbers are _o_f_f_s_e_t and _m_a_x_B_y_t_e_s: _o_f_f_s_e_t
- specifies a starting character position in the selection and
- _m_a_x_B_y_t_e_s gives the maximum number of bytes to retrieve. The command
- should return a value consisting of at most _m_a_x_B_y_t_e_s of the
- selection, starting at position _o_f_f_s_e_t. For very large selections
- (larger than _m_a_x_B_y_t_e_s) the selection will be retrieved using several
- invocations of _c_o_m_m_a_n_d with increasing _o_f_f_s_e_t values. If _c_o_m_m_a_n_d
- returns a string whose length is less than _m_a_x_B_y_t_e_s, the return
- value is assumed to include all of the remainder of the selection;
- if the length of _c_o_m_m_a_n_d's result is equal to _m_a_x_B_y_t_e_s then _c_o_m_m_a_n_d
- will be invoked again, until it eventually returns a result shorter
- than _m_a_x_B_y_t_e_s. The value of _m_a_x_B_y_t_e_s will always be relatively
- large (thousands of bytes).
-
- If _c_o_m_m_a_n_d returns an error then the selection retrieval is rejected
- just as if the selection didn't exist at all.
-
- The _f_o_r_m_a_t argument specifies the representation that should be used
- to transmit the selection to the requester (the second column of
- Table 2 of the ICCCM), and defaults to STRING. If _f_o_r_m_a_t is STRING,
- the selection is transmitted as 8-bit ASCII characters (i.e. just
- in the form returned by _c_o_m_m_a_n_d). If _f_o_r_m_a_t is ATOM, then the
- return value from _c_o_m_m_a_n_d is divided into fields separated by white
- space; each field is converted to its atom value, and the 32-bit
- atom value is transmitted instead of the atom name. For any other
- _f_o_r_m_a_t, the return value from _c_o_m_m_a_n_d is divided into fields
- separated by white space and each field is converted to a 32-bit
- integer; an array of integers is transmitted to the selection
- requester.
-
- The _f_o_r_m_a_t argument is needed only for compatibility with selection
- requesters that don't use Tk. If Tk is being used to retrieve the
- selection then the value is converted back to a string at the
- requesting end, so _f_o_r_m_a_t is irrelevant.
-
- sssseeeelllleeeeccccttttiiiioooonnnn oooowwwwnnnn ?----ddddiiiissssppppllllaaaayyyyooooffff _w_i_n_d_o_w? ?----sssseeeelllleeeeccccttttiiiioooonnnn _s_e_l_e_c_t_i_o_n?
- The first form of sssseeeelllleeeeccccttttiiiioooonnnn oooowwwwnnnn returns the path name of the window |
- in this application that owns _s_e_l_e_c_t_i_o_n on the display containing |
- _w_i_n_d_o_w, or an empty string if no window in this application owns the|
- selection. _S_e_l_e_c_t_i_o_n defaults to PRIMARY and _w_i_n_d_o_w defaults to |
- ``.''.
-
- sssseeeelllleeeeccccttttiiiioooonnnn oooowwwwnnnn ?----ccccoooommmmmmmmaaaannnndddd _c_o_m_m_a_n_d? ?----sssseeeelllleeeeccccttttiiiioooonnnn _s_e_l_e_c_t_i_o_n? _w_i_n_d_o_w
- The second form of sssseeeelllleeeeccccttttiiiioooonnnn oooowwwwnnnn causes _w_i_n_d_o_w to become the new |
- owner of _s_e_l_e_c_t_i_o_n on _w_i_n_d_o_w's display, returning an empty string as|
- result. The existing owner, if any, is notified that it has lost the|
- selection. If _c_o_m_m_a_n_d is specified, it is a Tcl script to execute |
- when some other window claims ownership of the selection away from |
- _w_i_n_d_o_w. _S_e_l_e_c_t_i_o_n defaults to PRIMARY.
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- sssseeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk)))) sssseeeelllleeeeccccttttiiiioooonnnn((((3333TTTTkkkk))))
-
-
-
- KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
- clear, format, handler, ICCCM, own, selection, target, type
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-